package com.hjc.service.user;

import com.hjc.dao.user.BillMapper;
import com.hjc.dao.user.ProviderMapper;
import com.hjc.entity.Bill;
import com.hjc.entity.Provider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("billService")
public class BillServiceImpl implements BillService {
    @Autowired
    private BillMapper billMapper;
    @Override
    public List<Bill> getBillMapperList(String productName, Integer isPayment) {
        return billMapper.getBillMapperList(productName,isPayment);
    }

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public int addinfo(Bill bill) {
        return billMapper.add(bill);
    }

    @Override
    public int xiugai(Bill bill) {

        return billMapper.xg(bill);
    }

    @Override
    public int shangchu(Bill bill) {
        return billMapper.delete(bill);
    }
}
